package com.strive.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.strive.common.model.dto.SysPower;
import com.strive.user.model.SysPowerRolesVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @description:
 * @author: bingcun.chen
 * @Date: 2022/2/23 14:57
 * @Version 1.0
 */
@Mapper
public interface SysPowerMapper extends BaseMapper<SysPower> {
    /**
     * 通过角色Codes查询权限
     * @param roleCodes
     * @return
     */
    List<SysPower> findPowersByRoles(@Param("roleCodes") Set<String> roleCodes);


    /**
     * 批量删除权限信息
     * @param ids
     */
    int deleteByMenuIds(@Param("ids")List<Long> ids);
}
